import { fromJS } from "immutable";
import * as constants from "./constants";
const defaultState= fromJS({
    detailList: [],
    title: '',
	content: ''
 
  });
export default function detailReducer(state=defaultState,action){

    const { type,  data } = action;
    switch(type){
        case constants.CHANGE_DETAIL:
            return state.merge({
				title: data.title,
				content: data.content,
                detailList:data
			})
		default:
			return state;
        }



}
